using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using NetWorkMsg;

namespace NetMsg.Food
{
    public class FoodInfo : IUnPackable
    {
        public int CfgId;
        public int Count;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            CfgId = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            Count = (int)var1;
        }
    }
    
    public struct GetFoodInfoQ : IServerCallbackable
    {
        
        public uint UnPackableId => 96;
        public uint PackableId => 130;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 130u);
        }
    }
    
    public class GetFoodInfoP : IUnPackable
    {
        public List<FoodInfo> Foods;
        
        public const uint Sid = 96;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Foods = new List<FoodInfo>((int)var0);
            for(var i = 0; i < var0; ++i)
            {
                var var1 = new FoodInfo();
                var1.UnPack(stream);
                Foods.Add(var1);
            }
        }
    }
    
    public class NoticeNewFoodP : IUnPackable
    {
        public FoodInfo New;
        
        public const uint Sid = 97;
        
        public void UnPack(MemoryStream stream)
        {
            New = new FoodInfo();
            New.UnPack(stream);
        }
    }
    
    public enum FoodEnum
    {
        GetFoodInfoP,
        NoticeNewFoodP,
    }
}
